<template>
    <div>
        <Web_search_box v-bind:searchReqUrl="baseSearchURL" @SearchResult="mySearch"></Web_search_box>
        <Result_form :request-u-r-l="baseUrl" :table-head-json-array="myTableHead" :op-base-url="opBaseUrl" type-before="" :addition-btns="myBtns"></Result_form>
    </div>
</template>

<script>
    import Result_form from "../components/myUtil/Result_form";
    import Web_search_box from "../components/myUtil/Web_search_box";
    export default {
        name: "school",
        components: {
            Web_search_box,
            Result_form
        },
        methods:{
            mySearch(url){
                this.baseUrl = url;
            }
        },
        data(){
            return{
                baseSearchURL:localStorage.getItem('reqBaseUrl') + '/api' + this.$route.path + '/search',
                baseUrl: localStorage.getItem('reqBaseUrl') + '/api' + this.$route.path + '/search' + '?',
                opBaseUrl:localStorage.getItem('reqBaseUrl') + '/api' + this.$route.path,
                myTableHead:[{colName:'id',showName:'id',inModel:false},{colName: 'name',showName: '单位名称'},{colName: 'isEnabled',showName: '审核状态',inModel:false}],
                myBtns: [{myStyle:'btn btn-success',name:'审核通过'},{myStyle:'btn btn-warning',name:'查看'},{myStyle:'btn btn-danger',name:'锁定'}]
            }
        }
    }
</script>

<style scoped>

</style>